<%@ page import="com.lagou.task.entity.Admin" %>
<%--
  Created by IntelliJ IDEA.
  User: liuyunkai
  Date: 2021/1/9
  Time: 3:44 下午
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
  <title>管理员登陆</title>
  <%--导入bootstrap样式--%>
  <link href="https://cdn.staticfile.org/twitter-bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet" type="text/css">
  <%--导入js插件--%>
  <script src="https://cdn.staticfile.org/jquery/2.1.1/jquery.min.js"></script>
  <script src="https://cdn.staticfile.org/twitter-bootstrap/3.3.7/js/bootstrap.min.js"></script>
  <style>
    #loginDiv {
      width: 60%;
      height: 60%;
      position: relative;
      top: 350px;
      left: 200px;
    }

  </style>
</head>
<body>
<div class="container-fluid" id="loginDiv">
  <form class="form-horizontal" action="login" method="post">
    <div class="form-group">
      <label class="col-sm-2 control-label">用户名：</label>
      <div class="col-sm-4">
        <input type="text" class="form-control" placeholder="管理员账号" name="adminName">
      </div>
    </div>
    <div class="form-group">
      <label class="col-sm-2 control-label">密&nbsp&nbsp&nbsp&nbsp码：</label>
      <div class="col-sm-4">
        <input type="password" class="form-control" placeholder="管理员密码" name="password">
      </div>
    </div>
    <div class="form-group">
      <div class="col-sm-offset-5 col-sm-10">
        <button type="submit" class="btn btn-info" id="Adminlogin">登陆</button>
      </div>
    </div>
  </form>
  <%--错误提示--%>
  <% String loginError = (String) request.getAttribute("loginError");
    if (loginError != null){ %>
  <div class="alert alert-danger col-lg-5" id="loginError" style="position: relative; left: 95px">
    <a href="#" class="close" data-dismiss="alert">&times;</a>
    <strong>登陆失败！用户名或密码错误！</strong>
  </div>
  <%}%>
</div>

<script>
  /* 设置错误提示和成功提示存活时间 */
  $("#loginError").delay(2000).fadeOut();
</script>
</body>
</html>